import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router);

export default new Router({
  // mode: "history",
  routes: [
    {
      path: '/',
      redirect: '/index'
    },
    {
      path: '/',
      component: () => import('@/components/common/Base.vue'),
      meta: {
        title: '公共部分'
      },
      children: [
        {
          path: '/index',
          component: () => import('@/views/home/index.vue'),
          meta: {
            title: '系统首页'
          }
        },
        {
          path: '/statistics/chart-simple',
          component: () => import('@/views/statistics/EchartsSimple.vue'),
          meta: {
            title: '论文统计'
          }
        },
        {
          path: '/statistics/chart-complex',
          component: () => import('@/views/statistics/EchartsComplex.vue'),
          meta: {
            title: '科研统计'
          }
        },
        {
          path: '/statistics/trafficVolume',
          component: () => import('@/views/statistics/TrafficVolume.vue'),
          meta: {
            title: '用户分析'
          }
        },
        {
          path: '/statistics/weekData',
          component: () => import('@/views/statistics/WeekData.vue'),
          meta: {
            title: '用户周数据'
          }
        },
        {
          path: '/manager/user',
          component: () => import('@/views/manager/user/index.vue'),
          meta: {
            title: '用户管理'
          }
        },
        {
          path: '/manager/notice',
          component: () => import('@/views/manager/notice/index.vue'),
          meta: {
          title: '公告管理'
          }
        },
        {
          path: '/manager/scienceDynamic',
          component: () => import('@/views/manager/scienceDynamic/index.vue'),
          meta: {
            title: '科研动态管理'
          }
        },
        {
          path: '/manager/userRole',
          component: () => import('@/views/manager/userRole/index.vue'),
          meta: {
            title: '角色管理'
          }
        },
        {
          path: '/manager/orgInfo',
          component: () => import('@/views/manager/orgInfo/index.vue'),
          meta: {
            title: '组织机构管理'
          }
        },
        {
          path: '/personalWork/researchProject',
          component: () => import('@/views/personalWork/researchProject/index.vue'),
          meta: {
            title: '科研项目'
          }
        },
        {
          path: '/personalWork/academicActivitie',
          component: () => import('@/views/personalWork/academicActivitie/index.vue'),
          meta: {
            title: '学术活动'
          }
        },
        {
          path: '/personalWork/feedback',
          component: () => import('@/views/personalWork/feedback/index.vue'),
          meta: {
            title: '项目反馈'
          }
        },
        {
          path: '/personalWork/scienceResult',
          component: () => import('@/views/personalWork/scienceResult/index.vue'),
          meta: {
            title: '科研成果'
          }
        },
        {
          path: '/personalWork/tab',
          component: () => import('@/views/personalWork/Tab.vue'),
          meta: {
            title: '系统消息'
          }
        },
      ]
		},
		{
			path: '/login',
			component: () => import('@/views/login/index.vue')
		},
		{
			path: '/error',
			component: () => import('@/views/error/index.vue')
		},
		{
			path: '/404',
			component: () => import('@/views/error/404.vue')
		}
  ]
})
